package server;

import java.io.Serializable;
import java.rmi.registry.Registry;

import chatInterface.Interface;

public class NodeRecord implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private String ip;
	private String name;
	private int id;
	private int port;
	private boolean leader=false;
	private boolean connected=false;
	private Interface chsClient;
	private Registry chsRegistry;
	
	public boolean getConnected() {
		return connected;
	}
	public Interface getInterface() {
		return this.chsClient;
	}
	public Registry getRegistry() {
		return this.chsRegistry;
	}
	public void setConnected(boolean connected,Registry chsRegistry,Interface chsClient) {
		this.connected = connected;
		this.chsRegistry=chsRegistry;
		this.chsClient=chsClient;
	}
	public void setConnect(boolean connected) {
		this.connected = connected;
	}
	public String getIp() {
		return ip;
	}
	public void setId(int id){
		this.id=id;
	}
	public void setLeader(boolean leader){
		this.leader=leader;
	}
	public int getId(){
		return this.id;
	}
	public boolean getLeader(){
		return this.leader;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getPort() {
		return port;
	}
	public void setPort(int port) {
		this.port = port;
	}
	
	NodeRecord(String name, String ip, int port){
		this.name=name;
		this.ip=ip;
		this.port=port;
	}
	
}
